projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58732bd
)
(child_setup): Check out==err when relocating fds.
author
Karl Heuer
<kwzh@gnu.org>
Thu, 31 Mar 1994 22:19:27 +0000
(22:19 +0000)
committer
Karl Heuer
<kwzh@gnu.org>
Thu, 31 Mar 1994 22:19:27 +0000
(22:19 +0000)
src/callproc.c
patch
|
blob
|
history
diff --git
a/src/callproc.c
b/src/callproc.c
index bce5b505df3d594256123fafcc475fe3f82ec223..9bf6d23b9acb805abea518a30cacb09421341567 100644
(file)
--- a/
src/callproc.c
+++ b/
src/callproc.c
@@
-646,8
+646,13
@@
child_setup (in, out, err, new_argv, set_pgrp, current_dir)
started with its standard in, out, or error closed, as might
happen under X. */
in = relocate_fd (in, 3);
- out = relocate_fd (out, 3);
- err = relocate_fd (err, 3);
+ if (out == err)
+ err = out = relocate_fd (out, 3);
+ else
+ {
+ out = relocate_fd (out, 3);
+ err = relocate_fd (err, 3);
+ }
close (0);
close (1);